package com.zhuiyun.project.api.frontPoetry.controller;

import com.zhuiyun.project.api.frontPoetry.service.FrontPoetryService;
import com.zhuiyun.project.common.controller.BaseController;
import com.zhuiyun.project.common.response.CommonResult;
import com.zhuiyun.project.utils.pageUtil.PageRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO  前段诗词控制层
 * @Author shy
 * @Date 2023/12/18 10:13
 */
@RestController
@RequestMapping("fontPoetry")
public class FrontPoetryController extends BaseController {
    @Autowired
    private FrontPoetryService fontPoetryService;
    @GetMapping("listAllPoetry")
    public CommonResult FrontAllPoetry(PageRequest pageRequest,Integer pageStatus){
        return fontPoetryService.FrontAllPoetry(pageRequest,pageStatus);
    }

    @GetMapping("getOneById")
    public CommonResult FrontGetPoetry(Integer id){
        return fontPoetryService.FrontGetPoetry(id);
    }
}